<template>
	<view class="foot-box">
		<view class="cont">
			<view class="item" :class="index == 1?'active':''" @tap="goUrl('/')">
				<image src="../static/home.png" class="icon" mode=""></image>
				<view class="txt">首页</view>
			</view>
			<!-- <view class="item" :class="index == 2?'active':''">
				<image src="../static/nearby.png" class="icon" mode=""></image>
				<view class="txt">附近</view>
			</view> -->
			<view class="item" :class="index == 3?'active':''" @tap="goUrl('/pages/order/list')">
				<image src="../static/order.png" class="icon" mode=""></image>
				<view class="txt">订单</view>
			</view>
			<view class="item" :class="index == 4?'active':''" @tap="goUrl('/pages/buyer/list')">
				<image src="../static/show.png" class="icon" mode=""></image>
				<view class="txt">买家秀</view>
			</view>
			<view class="item" :class="index == 5?'active':''" @tap="goUrl('/pages/my/mySelf')">
				<image src="../static/my.png" class="icon" mode=""></image>
				<view class="txt">我的</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			index:{
				default: 1
			}
		},
		name:"footer",
		data() {
			return {
				
			};
		},
		methods:{
			goUrl(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="less" scoped>
.foot-box{
	position: fixed;
	left: 0;
	bottom: 46rpx;
	width: 100%;
	
	.cont{
		width: 90%;
		height: 120rpx;
		border-radius: 63rpx;
		display: flex;
		// flex-direction: column;
		background: #E4919D;
		margin: 0 auto;
	}
	.item{
		color: rgba(255,255,255,0.5);
		font-size: 20rpx;
		flex: 1;
		text-align: center;
		margin-top: 20rpx;
		.icon{
			width: 44rpx;
			height: 44rpx;
			opacity: 0.5;
		}
	}
	.active{
		color: #fff;
		.icon{
			opacity: 1;
		}
	}
}
</style>